﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LS_BLSHModeWebForm.aspx.cs" Inherits="Anke.SHManage.Web.Reports.LS_BLSHModeWebForm" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>病历审核流水表</title>
    <script src="../Content/EasyUI/jquery.js"></script>
    <script src="../Content/EasyUI/jquery.easyui.js"></script>
    <script src="../Content/EasyUI/locale/easyui-lang-zh_CN.js"></script>
    <link href="../Content/EasyUI/themes/icon.css" rel="stylesheet" />
    <link href="../Content/EasyUI/themes/default/easyui.css" rel="stylesheet" />
    <script src="../Scripts/jquery.AnkeExtend.js"></script>
    <script type="text/javascript">
        //页面加载
        $(document).ready(function () {
            DisableBackspace();
            fillCombobox();
        });
        function fillCombobox() {

            //根据不合格原因
            $("#EndDate").datetimebox({

                onSelect: function (newValue) {

                    var tempyear = $('#StartDate').datebox('getValue');

                    var oldyear = tempyear.substr(0, 4);

                    if (newValue.getFullYear() != oldyear && oldyear.length > 1) {
                        $.messager.alert('警告', '无法累计不同年的不合格数，请重新选择年份!');
                        $("#EndDate").datebox('clear');
                    }
                }
            });

            //根据不合格原因
            $("#StartDate").datetimebox({

                onSelect: function (newValue) {

                    var tempyear = $('#EndDate').datebox('getValue');

                    var oldyear = tempyear.substr(0, 4);

                    if (newValue.getFullYear() != oldyear && oldyear.length > 1) {
                        $.messager.alert('警告', '无法累计不同年的不合格数，请重新选择年份!');
                        $("#StartDate").datebox('clear');
                    }
                }
            });

            //取所属分中心的下拉框的值
            $("#Center").combobox({
                url: "../BB/AllDictionary/GetCenterName",
                valueField: 'ID',
                textField: 'Name',
                editable: false,
                multiple: true,
                prompt: '--请选择--',
                onSelect: function (rec) {
                    var ids = $('#Center').combobox('getValues');
                    //根据分中心取分站
                    $("#Station").combobox({
                        url: "../BB/AllDictionary/GetSationName?centerID=" + ids,
                        method: 'POST',
                        valueField: 'ID',
                        textField: 'Name',
                        multiple: true,
                        editable: false,
                        onSelect: function () {
                            $('#Station').combobox('getValues')
                        },
                        onUnselect: function () {
                            $('#Station').combobox('getValues')
                        }
                    });
                    $("#Station").combobox('clear');
                },
                onUnselect: function (rec) {
                    var ids = $('#Center').combobox('getValues');
                    //根据分中心取分站
                    $("#Station").combobox({
                        url: "../BB/AllDictionary/GetSationName?centerID=" + ids,
                        method: 'POST',
                        valueField: 'ID',
                        textField: 'Name',
                        multiple: true,
                        editable: false
                        //onSelect: function () {
                        //    //$('#Station').combobox('getValues')
                        //},
                        //onUnselect: function () {
                        //    $('#Station').combobox('getValues')
                        //}
                    });
                    // $("#Station").combobox('setValues', '');
                    $("#Station").combobox('clear');
                },
            });

            var centers = $('#Center').combobox('getValues');
            $("#Station").combobox({
                url: "../BB/AllDictionary/GetSationName?centerID=" + centers,
                method: 'POST',
                valueField: 'ID',
                textField: 'Name',
                multiple: true,
                editable: false,
                onSelect: function () {
                    $('#Station').combobox('getValues')
                },
                onUnselect: function () {
                    $('#Station').combobox('getValues')
                }
            });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <table>
            <tr>
                <td>查询时间：</td>
                <td>
                    <asp:TextBox ID="StartDate" class="easyui-datetimebox" Style="width: 150px" runat="server" editable="false"></asp:TextBox>
                </td>
                <td style="text-align: center">至</td>
                <td>
                    <asp:TextBox ID="EndDate" class="easyui-datetimebox" Style="width: 150px" runat="server" editable="false"></asp:TextBox>
                </td>
                <td style="text-align: right">分中心：</td>
                <td>
                    <asp:TextBox ID="Center" class="easyui-combobox" Style="width: 150px" runat="server"></asp:TextBox>
                    <%--<asp:DropDownList ID="DropDownList_Center" runat="server" Width="150px" AutoPostBack="True" OnSelectedIndexChanged="DropDownList_Center_SelectedIndexChanged"></asp:DropDownList>--%>
                </td>
                <td style="text-align: right">分站：</td>
                <td>
                    <asp:TextBox ID="Station" class="easyui-combobox" Style="width: 150px" runat="server"></asp:TextBox>
                    <%--<asp:DropDownList ID="DropDownList_Station" runat="server" Width="150px" AutoPostBack="True"></asp:DropDownList>--%>
                </td>
                <td style="text-align: right">工号：</td>
                <td>
                    <asp:TextBox ID="WorkID" class="easyui-textbox" Style="width: 150px" runat="server"></asp:TextBox>
                </td>
               
            </tr>
            <tr>  
                <td style="text-align: right">姓名：</td>
                <td>
                    <asp:TextBox ID="Name" class="easyui-textbox" Style="width: 150px" runat="server"></asp:TextBox>
                </td>     
                <td style="text-align: right">角色：</td>
                <td>                   
                     <asp:HiddenField ID="HiddenForRole" runat="server" />
                    <select id="Roles" class="easyui-combobox" style="width: 150px" data-options="editable:false" runat="server">
                        <option value="">--请选择--</option>
                        <option value="4">医生</option>
                        <option value="5">护士</option>
                    </select>
                </td>
                <td style="text-align: right">审核结果：</td>
                <td>
                    <%--<asp:TextBox ID="Result" class="easyui-combobox" Style="width: 150px" runat="server"></asp:TextBox>--%>
                    <asp:HiddenField ID="HiddenForResult" runat="server" />
                    <select id="Results" class="easyui-combobox" style="width: 150px" data-options="editable:false" runat="server">
                        <option value="--请选择--">--请选择--</option>
                        <option value="优秀">优秀</option>
                        <option value="良好">良好</option>
                         <option value="合格">合格</option>
                        <option value="未通过">未通过</option>
                        <option value="累计四次以上不合格">累计四次以上不合格</option>
                    </select>
                </td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                
                <td>
                    <asp:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click" />
                </td>
            </tr>
        </table>
        <div style="background-color: #fafafa; border-left: 1px solid scrollbar; overflow: hidden; height: 100%;">
            <rsweb:ReportViewer ID="ReportViewer1" runat="server" Width="100%" Height="100%"  SizeToReportContent="True">
            </rsweb:ReportViewer>
        </div>
    </form>
</body>
</html>


